/**
 * Copyright (C)  2011  chen wei hua.
 * Permission is granted to copy, distribute and/or modify this document
 * under the terms of the GNU Free Documentation License, Version 2.0
 * or any later version published by the Free Software Foundation;
 * with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 * A copy of the license is included in the section entitled "GNU Free Documentation License".
 */
package com.javaeye.store.dao;

import java.util.List;

import com.javaeye.common.dao.DAO;
import com.javaeye.store.dto.MaterialsBatchDetail;

public interface MaterialsBatchDetailDAO extends DAO {
	
	public List<MaterialsBatchDetail> getBatchInfoByMaterialsId(int materialsId);
	
	public MaterialsBatchDetail getBatchDetail(int materialsId, String batchNo);
	
	public void save(MaterialsBatchDetail detail);
	
	public MaterialsBatchDetail getBatchInfo(int batchDetailId);
	
	public List<MaterialsBatchDetail> getNotFinishBatchInfo(int materialsId);
	
	/**
	 * 返回没有完成的产品计划批号
	 * @return
	 */
	public List<String> getNotFinishProductBatchInfo();
	
	public List<MaterialsBatchDetail> getNotEmptyMeterialsBatchInfo(int materialsId);
	
	/**
	 * 查询有退货物料的批次信息
	 * @param materialsId
	 * @return
	 */
	public List<MaterialsBatchDetail> getDefectiveMaterialsBatchInfo(int materialsId);
	
	/**
	 * 查询有退货，且未退完的物料的最大采购价格
	 * @param materialsId
	 * @return
	 */
	public double getMaxPrice(int materialsId);
	
	public void removeDetail(int materialsId);
}
